﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="ViewWorkshopA.aspx.vb" Inherits="TWIN_test.ViewA" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body bgcolor="C0C0C0">
    <form id="form1" runat="server">
    <center><div>

        Workshop Information
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="ID" DataSourceID="SqlDataSource2">
            <Columns>
                <asp:BoundField DataField="ID" HeaderText="ID" ReadOnly="True" 
                    SortExpression="ID" />
                <asp:BoundField DataField="TITLE" HeaderText="TITLE" SortExpression="TITLE" />
                <asp:BoundField DataField="INSTRUCTORID" HeaderText="INSTRUCTORID" 
                    SortExpression="INSTRUCTORID" />
                <asp:BoundField DataField="DESCRIPTION" HeaderText="DESCRIPTION" 
                    SortExpression="DESCRIPTION" />
                <asp:BoundField DataField="WORKSHOPSTART" HeaderText="WORKSHOPSTART" 
                    SortExpression="WORKSHOPSTART" />
                <asp:BoundField DataField="WORKSHOPFINISH" HeaderText="WORKSHOPFINISH" 
                    SortExpression="WORKSHOPFINISH" />
                <asp:BoundField DataField="LOCATION" HeaderText="LOCATION" 
                    SortExpression="LOCATION" />
            </Columns>
        </asp:GridView><br /><br /> Workshop Roster
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="USERNAME" DataSourceID="SqlDataSource3">
            <Columns>
                <asp:BoundField DataField="USERNAME" HeaderText="USERNAME" ReadOnly="True" 
                    SortExpression="USERNAME" />
                <asp:BoundField DataField="FIRSTNAME" HeaderText="FIRSTNAME" 
                    SortExpression="FIRSTNAME" />
                <asp:BoundField DataField="LASTNAME" HeaderText="LASTNAME" 
                    SortExpression="LASTNAME" />
            </Columns>
        </asp:GridView>
    <br /> <asp:Button id="editButton"  runat="server" text="Edit Info" /> 
    <br /> <asp:Button id='deleteButton'  runat="server" text="Delete" />
    <br /> <asp:Button id="backButton" runat="server" text="Back" />
   
   <asp:SqlDataSource ID="SqlDataSource2" runat="server"  
            ConnectionString="<%$ ConnectionStrings:ConnectionString2 %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionString2.ProviderName %>" 
            
            
            SelectCommand="SELECT * FROM &quot;WORKSHOP&quot; WHERE (&quot;ID&quot; = :ID)" >
       
       <SelectParameters>
           <asp:QueryStringParameter Name="ID" QueryStringField="id" Type="Decimal" />
       </SelectParameters>
        </asp:SqlDataSource>
       
        <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString2 %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionString2.ProviderName %>" 
            SelectCommand="SELECT INFO.USERNAME, INFO.FIRSTNAME, INFO.LASTNAME FROM INFO, WORKSHOPS_TAKEN WHERE INFO.USERNAME = WORKSHOPS_TAKEN.USERNAME AND (WORKSHOPS_TAKEN.WORKSHOP_ID = :ID)">
            <SelectParameters>
                <asp:QueryStringParameter Name="ID" QueryStringField="id" />
            </SelectParameters>
        </asp:SqlDataSource>
       
    </div></center>
    </form>
</body>
</html>
